Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle Duplicate decision numbers #132

Merged
merged 16 commits into from
Feb 13, 2025
Merged

Handle Duplicate decision numbers #132

merged 16 commits into from
Feb 13, 2025

Conversation

t11omas
Copy link
Contributor

@t11omas t11omas commented Feb 11, 2025

This PR is an attempt to address the duplicate decision numbers. Its a really tough issue to reproduce locally during integration tests, and I have been unsuccessful in doing so.

This Pr changes how decisions are saved within BTMS, previously it was done within the DecisionConsumer, but now its done as part of the Notification/Movement consumers, and the save happens within the transaction. This should ensure that the count of decision, and the decision number are unique.

To further enforce the decision numbers are unique, a compound index has been added on the EntryReference plus DecisionNumber, which will ensure at the DB level decision numbers are unique.

This PR also adds in audit entries for skipped records to help track when records are skipped due to be an earlier version

@t11omas t11omas marked this pull request as ready for review February 11, 2025 19:16
@t11omas t11omas changed the title Added unique constraint on decisionNumber Handle Duplicate decision numbers Feb 12, 2025
Copy link

Code Coverage

Package Line Rate Branch Rate Health
Btms.Business 86% 77%
Btms.SyncJob 63% 45%
Btms.Metrics 82% 0%
Btms.Analytics 74% 73%
Btms.Backend.Data 64% 60%
Btms.Types.Ipaffs 95% 62%
TestDataGenerator 83% 79%
Btms.Backend 62% 42%
Btms.BlobService 38% 27%
Btms.Emf 11% 0%
Btms.Common 74% 56%
Btms.Azure 43% 100%
Btms.Consumers 82% 73%
Btms.Types.Alvs 85% 50%
Btms.Types.Gvms.Mapping 38% 25%
Btms.Types.Alvs.Mapping 81% 0%
Btms.Types.Ipaffs.Mapping 77% 57%
Btms.Types.Gvms 61% 100%
Btms.SensitiveData 79% 83%
Btms.Types.Alvs.Mapping.V1.Tests 0% 0%
Btms.Model 93% 93%
TestGenerator.IntegrationTesting.Backend 83% 71%
Summary 79% (10178 / 12943) 64% (1080 / 1689)

@t11omas t11omas merged commit f69ecbf into main Feb 13, 2025
3 checks passed
@t11omas t11omas deleted the feature/cdms-342 branch February 13, 2025 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants